from django.contrib import admin
from django.urls import path
from myapp.IM import T_IM
from myapp.file_update_down import pdf, question, type_select, Data_manipulation, history
from myapp.ge_phone import SendVerificationCodeView_AddAndBindGoogleAuthView, generate_google_authenticator
from myapp.aouthlogin import SessionJsonData
from myapp.gongdan import FlowTest
from myapp.tubiao import tu_biao
from myapp.users import usersoperate
from myapp.roles import rolesoperate
urlpatterns = [
    path('admin/', admin.site.urls),
    # 其他路由...
    path('Google_Registration_Checkup/', generate_google_authenticator.as_view(), {'action': 'Google_Registration_Checkup'}, name='ge_phonelogin'),
    path('get_saved_json/', SessionJsonData.as_view(), {'action': 'get_saved_json'}, name='aouthlogin'),
    path('choose_loginpage/', SessionJsonData.as_view(), {'action': 'choose_loginpage'}, name='aouthlogin'),
    path('save_token/', SessionJsonData.as_view(), {'action': 'save_token'}, name='aouthlogin'),
    path('csrf/', SessionJsonData.as_view(), {'action': 'csrf'}, name='aouthlogin'),
    path('users/', usersoperate.as_view(), {'action': 'users'}, name='users'),
    path('flush/', usersoperate.as_view(), {'action': 'flush'}, name='users'),
    path('usersadd/', usersoperate.as_view(), {'action': 'usersadd'}, name='users'),
    path('usersdel/', usersoperate.as_view(), {'action': 'usersdel'}, name='users'),
    path('showuserEdit/', usersoperate.as_view(), {'action': 'showuserEdit'}, name='users'),
    path('usersedit/', usersoperate.as_view(), {'action': 'usersedit'}, name='users'),
    path('showaddmenus/', rolesoperate.as_view(), {'action': 'showaddmenus'}, name='role'),
    path('addmenus/', rolesoperate.as_view(), {'action': 'addmenus'}, name='role'),
    path('getrole/', rolesoperate.as_view(), {'action': 'getrole'}, name='role'),
    path('editUserlogin/', usersoperate.as_view(), {'action': 'editUserlogin'}, name='users'),
    path('menus/', rolesoperate.as_view(), {'action': 'menus'}, name='role'),
    path('addrole/', rolesoperate.as_view(), {'action': 'addrole'}, name='role'),
    path('delrole/', rolesoperate.as_view(), {'action': 'delrole'}, name='role'),
    path('editrole/', rolesoperate.as_view(), {'action': 'editrole'}, name='role'),
    path('showroleEdit/', rolesoperate.as_view(), {'action': 'showroleEdit'}, name='role'),
    path('addrights/', rolesoperate.as_view(), {'action': 'addrights'}, name='role'),
    path('delrights/', rolesoperate.as_view(), {'action': 'delrights'}, name='role'),
    path('edituserrole/', rolesoperate.as_view(), {'action': 'edituserrole'}, name='role'),
    path('getRightsList/', rolesoperate.as_view(), {'action': 'getRightsList'}, name='role'),
    path('showeditrights/', rolesoperate.as_view(), {'action': 'showeditrights'}, name='role'),
    path('editright/', rolesoperate.as_view(), {'action': 'editright'}, name='role'),
    # path('rolepermissionshow/', rolesoperate.as_view(), {'action': 'rolepermissionshow'}, name='role'),
    path('send_verification_code/', SendVerificationCodeView_AddAndBindGoogleAuthView.as_view(), {'action': 'SendVerificationCodeView'},name='ge_phonelogin'),
    path('add_and_bind_google_auth1/', SendVerificationCodeView_AddAndBindGoogleAuthView.as_view(), {'action': 'AddAndBindGoogleAuthView'},name='ge_phonelogin'),
    path('Create_account/', T_IM.as_view(), {'action': 'Create_account'}, name='T_IM'),
    path('imuserinfo/', T_IM.as_view(), {'action': 'imuserinfo'}, name='T_IM'),
    path('upload_image/', T_IM.as_view(), {'action': 'upload_image'}, name='T_IM'),
    path('ai/', T_IM.as_view(), {'action': 'ai'}, name='T_IM'),
    # path('FlowTest/', FlowTest.as_view(), name='im_flow'),
    path('pdf/', pdf.as_view()),
    path('opstion/', question.as_view()),
    path('opstion/', question.as_view()),
    path('type_select/', type_select.as_view()),
    path('Data_manipulation/', Data_manipulation.as_view()),
    path('history/', history.as_view()),
    path('tu_biao/', tu_biao.as_view()),
]

